

<div class="layui-form" lay-filter="layuiadmin-form-leaderadmin" style="padding: 20px 0 0 0;">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">团长名称</label>
            <div class="layui-input-inline layui-input-wrap">
                <input type="text" name="leaderName" id="ID-input-leader-addform-leaderName" lay-verify="required" placeholder="请输入完整的团长名称" autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-form-mid" style="padding: 0!important;">
                <button type="button" id="ID-button-leader-addform-getLeaderByName" class="layui-btn layui-btn-primary" lay-on="getLeaderByName">查询</button>
            </div>
        </div>
    </div>
    <div id="ID-div-leader-addform-radioGroupContainer"></div>
    <div class="layui-form-item">
        <label class="layui-form-label">团长ID</label>
        <div class="layui-input-inline">
            <input type="text" name="leaderId" id="ID-input-leader-addform-leaderId" lay-verify="required" placeholder="" autocomplete="off" class="layui-input" readonly />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">团长图标</label>
        <div class="layui-input-inline">
            <img id="ID-img-leader-addform-iconUrl" src="" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <button class="layui-btn layui-btn-primary layui-border" lay-on="leaderaddformcancel">取消</button>
            <button type="submit" class="layui-btn" lay-submit lay-filter="LAY-leader-addform-submit">确定</button>
        </div>
    </div>
</div>

<script>
    layui.use(['admin', 'form', 'upload'], function () {
        var $ = layui.$
            , form = layui.form
            , upload = layui.upload;

        //上传头像
        upload.render({
            elem: '#layuiadmin-upload-useradmin'
            , url: './res/json/upload/demo.js'
            , accept: 'images'
            , method: 'get'
            , acceptMime: 'image/*'
            , done: function (res) {
                $(this.item).prev("div").children("input").val(res.data.src)
            }
        });
    })
</script>